﻿using System;
using System.Windows.Forms;

using DreamCube.WinForm.Common;
using DreamCube.Foundation.Basic.Utility;

namespace WebServer.WinServiceManager
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //线程异常捕获
            Application.ThreadException += DreamCube.WinForm.Common.MyApp.Application_ThreadException;
            if (!DreamCube.Foundation.Basic.Utility.MyApp.IsExistApp(Properties.Resources.AppKey))
            {
                MainForm form = new MainForm();
                form.Text = MyConfig.GetAppName();
                Application.Run(form);
            }
            else
            {
                MessageBox.Show("只能运行一个程序实例哦，请在右下角双击打开程序！", "重复打开软件提醒");
            }
        }
    }
}
